<?php
class ModelPaymentBank extends Model {
	public function getBanks() {
		$bank_data = $this->cache->get('bank');
		
		if (!$bank_data) {		
			$bank_data = array();
			
			$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "bank WHERE status = '1' ORDER BY bank_id DESC");
		
    		foreach ($query->rows as $result) {
      			$bank_data[$result['bank_id']] = array(
        			'bank_id'  => $result['bank_id'],
        			'bank_name'     => $result['bank_name'],
        			'bank_account'  => $result['bank_account'],
					'bank_account_name'  => $result['bank_account_name'],

      			);
    		}	
			
			$this->cache->set('bank', $bank_data);
		}
		
		return $bank_data;	
	}

}
?>